-
Notifications
You must be signed in to change notification settings - Fork 275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid login issue in deployment E2E tests #2065
Conversation
WP admin email verification for an old WP 6.5 build appears to be causing a login failure error during the deployment tests. We aren't testing login, so lets just disable login for these tests.
This is necessary to continue using the same logged-in screenshots for reference in the tests.
I'm not yet sure why CI continues to fail with these E2E tests. These changes seem to fix the testing issue when run locally with
|
Hm, nothing obvious stands out to me 🤔 |
Thanks for considering this, @adamziel. Something strange is going on with the old version, but I don't think we need to understand why. Instead, I plan to just disable logins and update the old-version reference screenshots to match that. How did you originally generate the screenshots to match what CI will create? My plan is to just use a temp commit to generate the screenshots as part of the tests and then save those, but maybe there is a faster or easier way. Since I ran out of time this evening, I created #2071 to temporarily disable the tests before we can fix them properly. |
@brandonpayton I think I downloaded the CI artifacts and replaced the local screenshots – the CI runner had a different set of fonts than my mac so I couldn't easily use the ones generated locally. |
## Motivation for the change, related issues Adds a small "why" comment to WP_WXR_Reader about lazy init. I originally had a question about this code, and the comment answers it. ## Testing Instructions (or ideally a Blueprint) CI
…xporting the entire site (#2103)
Adds a basic `WP_HTML_To_Blocks` class that accepts HTML and outputs block markup. It's a very basic converter. It only considers the markup and won't consider any visual changes introduced via CSS or JavaScript. Only a few core blocks are supported in this initial PR. The API can easily support more HTML elements and blocks. To preserve visual fidelity between the original HTML page and the produced block markup, we'll need an annotated HTML input produced by the [Try WordPress](https://github.com/WordPress/try-wordpress/) browser extension. It would contain each element's colors, sizes, etc. We cannot possibly get all from just analyzing the HTML on the server without building a full-blown, browser-like HTML renderer in PHP, and I know I'm not building one. A part of #1894 ## Example ```php $html = <<<HTML <meta name="post_title" content="My first post"> <p>Hello <b>world</b>!</p> HTML; $converter = new WP_HTML_To_Blocks( $html ); $converter->convert(); var_dump( $converter->get_all_metadata() ); /* * array( 'post_title' => array( 'My first post' ) ) */ var_dump( $converter->get_block_markup() ); /* * <!-- wp:paragraph --> * <p>Hello <b>world</b>!</p> * <!-- /wp:paragraph --> */ ``` ## Caveats I had to patch WP_HTML_Processor to stop baling out on `<meta>` tags referencing the document charset. Ideally we'd patch WordPress core to stop baling out when the charset is UTF-8. ## Testing instructions This PR mostly adds new code. Just confirm the unit tests pass in CI. cc @brandonpayton @zaerl @sirreal @dmsnell @ellatrix
…ng activation or produces an output (#2066)
… which is missing from zipped old site build
ac42c84
to
5654edc
Compare
Thanks for your feedback on this, @adamziel. The edge cases with the old version were gnarly. When I started using a Blueprint URL, we started seeing boot failures related a missing PHP 8.3 wasm in the old build. Thankfully, it turns out that we can use shorthand params to avoid login and apparently avoid that other error. I updated the screenshots, and the tests are passing again. Time to merge this so more deployment tests are running again. |
Motivation for the change, related issues
The deployment E2E tests are currently broken. WP admin email verification for an old WP 6.5 build appears to be causing a login failure error during the deployment tests.
An example of a failing screenshot comparison due to failed login is here.
Implementation details
This PR disables login to avoid problems with admin email verification on an old, pre-installed WP build.
Testing Instructions (or ideally a Blueprint)